package com.jspxcms.plug.domain;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by yuanyue on 14-9-7.
 */
public class PlugDoctorDiseasePK implements Serializable {
    private int fDiseaseId;
    private int fDoctorId;

    @Column(name = "f_disease_id", nullable = false, insertable = true, updatable = true)
    @Id
    public int getfDiseaseId() {
        return fDiseaseId;
    }

    public void setfDiseaseId(int fDiseaseId) {
        this.fDiseaseId = fDiseaseId;
    }

    @Column(name = "f_doctor_id", nullable = false, insertable = true, updatable = true)
    @Id
    public int getfDoctorId() {
        return fDoctorId;
    }

    public void setfDoctorId(int fDoctorId) {
        this.fDoctorId = fDoctorId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PlugDoctorDiseasePK that = (PlugDoctorDiseasePK) o;

        if (fDiseaseId != that.fDiseaseId) return false;
        if (fDoctorId != that.fDoctorId) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = fDiseaseId;
        result = 31 * result + fDoctorId;
        return result;
    }
}
